package tools

import (
	"fmt"
	"gitee.com/mcp-office/agent/llm"
)

var WeatherTool = llm.Tools{
	Type: "function",
	Function: llm.Function{
		Name:        "get_weather",
		Description: "获取城市天气信息",
		Parameters: &llm.Parameters{
			Type: "object",
			Properties: map[string]interface{}{
				"location": map[string]string{
					"type":        "string",
					"description": "城市名称",
				},
			},
			Required: []string{"location"},
		},
	},
}

func GetWeather(location string) string {
	// 实际应调用天气API
	return fmt.Sprintf(`{"location":"%s","temperature":"25°C","condition":"大暴雨"}`, location)
}
